<?php session_start(); header("Content-Type: text/html; charset=ISO-8859-1",true);
if($_SESSION["id_cadastro_usuarios"]==""){
header("Location: cadastro_curriculo.php");
exit();
}
include "conexao.php";?>
<script src="apaga_vagas_concorrendo.js"></script>
<?php 
$id = $_GET["id"];
$id_vagas = str_replace("resultado", "", $id);

mysql_query("delete from vagas_curriculos where id_vagas='$id_vagas' and id_cadastro_usuarios = '".$_SESSION["id_cadastro_usuarios"]."'");

?>
 <div style="width:780px; float:left; text-transform:capitalize; font-weight: bold;">
          <div style="width:120px; height:60px;float:left;border:1px solid #155E62;">cargo vaga</div>
        <div style="width:90px;height:60px;float:left;border:1px solid #155E62;">Quantidade devagas</div>
        <div style="width:160px;height:60px;float:left;border:1px solid #155E62;">Empresa</div>
        <div style="width:80px;height:60px;float:left;border:1px solid #155E62;">Cidade</div>
        <div style="width:85px;height:60px;float:left;border:1px solid #155E62;">Hor&aacute;rio</div>
        <div style="width:110px;height:60px;float:left;border:1px solid #155E62;">Data do an&uacute;ncio</div>
        <div style="width:100px;height:60px;float:left;border:1px solid #155E62;">A&ccedil;&otilde;es</div>
   
        </div>
            <div style="width:780px; height:100%; float:left;">
          <?php $sq_v = mysql_query("SELECT cadastro_empresa.nome_fantasia,cadastro_empresa.confidencial, vagas_curriculos.id_vagas, v. * FROM cadastro_empresa, vagas_curriculos, vagas v WHERE vagas_curriculos.id_vagas = v.id_vagas and cadastro_empresa.id_cadastro_empresa = v.id_cadastro_empresa
and vagas_curriculos.id_cadastro_usuarios = '".$_SESSION["id_cadastro_usuarios"]."'");
		        while($linha=mysql_fetch_array($sq_v)){
			   extract($linha);
		  ?>
        
        
        <div style="width:120px; height:85px;float:left; border:1px solid #CCCCCC;"><?php echo $cargo_vaga; ?></div>
        <div style="width:90px;height:85px;;float:left;border:1px solid #CCCCCC;"><?php echo $qtde_vagas ; ?></div>
        <div style="width:160px;height:85px;float:left;border:1px solid #CCCCCC;"><?php if($confidencial=="N"){echo $nome_fantasia;}elseif($confidencial=="S"){echo "Confidencial"; }?></div>
        <div style="width:80px;height:85px;float:left;border:1px solid #CCCCCC;"><?php echo $cidade_trabalho; ?></div>
        <div style="width:85px;height:85px;float:left;border:1px solid #CCCCCC;"><?php echo $horario_trabalho; ?></div>
        <div style="width:110px;height:85px;float:left;border:1px solid #CCCCCC;">
       <?php $da=explode("-",$data);echo $da[2]."/".$da[1]."/".$da[0];?></div>
         <div style="width:100px;height:85px;float:left;border:1px solid #CCCCCC;">
      <a href="visualizar_vaga.php?id_vagas=<?php echo $id_vagas;?>" onclick="return GB_myShow('Visualiza&ccedil;&atilde;o da Vaga Que Voc&ecirc; Est&aacute; Candidatado', this.href)">Visualizar</a><br />
      
    <?php echo "<a href=\"javascript://\" val=\"".$id_vagas."\" id=\"confirma\">Desistir</a><span id=\"resultado".$id_vagas."\"></span><br>"; ?>

      
            
      </div>
       
        <?php }?>
         </div>
        <script type="text/javascript">
GB_myShow = function(caption, url, /* optional */ height, width, callback_fn) {
    var options = {
        caption: caption,
        height: height || 1300,
        width: width || 800,
        fullscreen: false,
        show_loading: true,
        callback_fn: callback_fn
    }
    var win = new GB_Window(options);
    return win.show(url);
}
</script>